package com.itheima.security_demo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import com.itheima.security_demo.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface UserMapper extends BaseMapper<User> {


    @Select("select t1.role_desc from ss_role t1,ss_role_user t2,ss_user t3" +
            " where t1.role_id = t2.role_id and t2.user_id = t3.user_id" +
            " and t3.user_name = #{username}")
    public List<String> selectRoles(String username);
}
